package com.littlepay.kr4.paulin.dfeba77.adapter;

import com.littlepay.kr4.paulin.dfeba77.R;

/**
 * Created by 77dfeba on 2017/5/27.
 * 用于获取icon
 */

public class StickerAdapter {
    public static final int[] icon = {
            R.drawable.btn_addspend_more_i,R.drawable.btn_addspend_eat_i,R.drawable.btn_addspend_taxi_i, R.drawable.btn_addspend_shop_i,R.drawable.btn_addspend_recreation_i,
            R.drawable.btn_addspend_live_i, R.drawable.btn_addspend_borrow_i, R.drawable.btn_addspend_beauty_i, R.drawable.btn_addspend_health_i, R.drawable.btn_addspend_pet_i,
    };
    private static final String[] attri = {
        "自定义","吃饭","出行","购物","娱乐",
        "住宿","借出","美容","医疗","宠物"
    };

    public static int getAttri(int attr){
        int iattri = 0;
        switch (icon[attr]){
            case R.drawable.btn_addspend_more_i:
                iattri = 0;
                break;
            case R.drawable.btn_addspend_eat_i:
                iattri = 1;
                break;
            case R.drawable.btn_addspend_taxi_i:
                iattri = 2;
                break;
            case R.drawable.btn_addspend_shop_i:
                iattri = 3;
                break;
            case R.drawable.btn_addspend_recreation_i:
                iattri = 4;
                break;
            case R.drawable.btn_addspend_live_i:
                iattri = 5;
                break;
            case R.drawable.btn_addspend_borrow_i:
                iattri = 6;
                break;
            case R.drawable.btn_addspend_beauty_i:
                iattri = 7;
                break;
            case R.drawable.btn_addspend_health_i:
                iattri = 8;
                break;
            case R.drawable.btn_addspend_pet_i:
                iattri = 9;
                break;
            default:
                iattri = 0;
                break;
        }
        return iattri;
    }
    public static int attriToInt(int index){
        return getAttri(index);
    }
    public static int attriToIcon(int index){
        return icon[getAttri(index)];
    }
    public static String attrToString(int index){
        return attri[getAttri(index)];
    }
}
